package com.eatme.dao;

import com.eatme.model.BasicList;

import java.util.List;
import java.util.Iterator;

/**
 * The implementation-independent DAO interface. Defines the operations required
 * to be supported by an implementation.
 */

public interface BasicListDao {
    /**
     * Load a {@link com.eatme.model.BasicList} from the DB, given it's <tt>id</tt>.
     *
     * @param id The id of the Contact to load.
     * @return BasicList
     */
     BasicList load(long id);

    /**
     * Save the contact to the DB
     *
     * @param basicList
     * @return persistent instance of contact
     */
     BasicList save(BasicList basicList);

    /**
     * Delete a {@link BasicList} from the DB, given it's <tt>id</tt>.
     *
     * @param id The id of the Contact to delete.
     */
    void delete(long id);

    /**
     * Query the DB, using the supplied query details.
     *
     * @param qp Query Paramaters to use.
     * @return The results of the query as an Iterator.
     */
    Iterator<BasicList> find(QueryParam qp, BasicList filterBasicList);

    /**
     * Return the number of Contacts in the DB.
     *
     * @return count
     */
    int count(BasicList filterBasicList);

    /**
     * Returns the list of all unique last names in the database
     *
     * @return the list of all unique last names in the database
     */
	List<String> getUniqueLastNames();
}
